"""
@Author : 合肥一元数智教育科技有限公司
@Date :  2025/5/8 8:43
@Description : 


python语言中支持的运算符号
2. 逻辑运算     and  or  not
一般都是针对布尔类型值
and     a  and b  -> true    a=true,b=true
or      a  or b  -> false    a=false,b=false
not     取反
"""
bool1 = True
bool2 = False

result = bool1 and bool2
print(result)

result = bool1 or bool2
print(result)

result = not bool2
print(result)

print('--------------------------------------')
num1 = 3
num2 = 2
print(num1 and num2)  # 3 and 2    # 隐式数据类型转换    遵循数值->布尔
print(num1 or num2)  # 3  or  2

print('--------------------------------------')

num1 = '1'
num2 = '2'
print(num1 and num2)  # '3' and '2'    隐式数据类型转换    遵循字符串->布尔
print(num1 or num2)  # '3'  or  '2'
